Package org.mozilla.jss.crypto
Interface PrivateKey
- All Superinterfaces:
Destroyable,Key,PrivateKey,Serializable
- All Known Implementing Classes:
PK11DSAPrivateKey,PK11ECPrivateKey,PK11PrivKey,PK11RSAPrivateKey
Private Keys used by JSS. All the private keys handled by JSS are
of this type, which is a subtype of java.security.PrivateKey.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.TypeGeneric ML-DSA alias; resolves to ML-DSA-65 (NIST security level 3).static final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.TypeGeneric ML-KEM alias; resolves to ML-KEM-768 (NIST security level 3).static final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.Typestatic final PrivateKey.TypeFields inherited from interface java.security.PrivateKey
serialVersionUID -
Method Summary
Modifier and TypeMethodDescriptionReturns the CryptoToken that owns this private key.default AlgorithmParameterSpecintReturns the size, in bits, of the modulus of an RSA key.getType()Returns the type (RSA, DSA, ML-DSA or ML-KEM) of this private key.byte[]Returns the unique ID of this key.Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyedMethods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
Field Details
-
RSA
-
DSA
-
EC
-
MLKEM512
-
MLKEM768
-
MLKEM
Generic ML-KEM alias; resolves to ML-KEM-768 (NIST security level 3). -
MLKEM1024
-
MLDSA44
-
MLDSA65
-
MLDSA
Generic ML-DSA alias; resolves to ML-DSA-65 (NIST security level 3). -
MLDSA87
-
DiffieHellman
-
-
Method Details
-
getType
Returns the type (RSA, DSA, ML-DSA or ML-KEM) of this private key.- Throws:
KeyException
-
getUniqueID
Returns the unique ID of this key. Unique IDs can be used to match certificates to keys.- Throws:
TokenException- See Also:
-
getStrength
int getStrength()Returns the size, in bits, of the modulus of an RSA key. Returns -1 for other types of keys. -
getParams
-
getOwningToken
CryptoToken getOwningToken()Returns the CryptoToken that owns this private key. Cryptographic operations with this key may only be performed on the token that owns the key.
-